<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<script>
		/**
		 * 原型链
		 * 1、prototype是函数的一个属性，js中每个函数都有这个属性，它指向一个对象，就是我们常说的原型；
		 * 2、__proto__是对象的一个内部函数，是不会被外部看到的，就是js内部用来查看原型链的；
		 * 3、__proto__为null的链叫做原型链。原型链实际上就是js中数据继承的继承链。
		 */
		
		/*function Car(colorName,color,owner){
			this.colorName = colorName,
			this.color = color,
			this.owner = owner
		};
		var person = new Car('BMW','黑','陈有护');*/


		/*person.prototype.name = 'sunny';
		function person(){
		}
		person.prototype = {
			name : 'cherry'
		}
		var person = new person();*/


		/*person.prototype = {
			name: 'a',
			sayName : function (){
				console.log(this.name);
			}
		}
		function person (){

		}
		var person = new person();*/


		/*var obj = {};
		var obj1 = new Object(obj);*/

		/*function person(name,age,sex){
			this.name = name;
			this.age = age;
			this.sex = sex;
		}
		function student(name,age,sex,tel,grade){
			person.call(this,name,age,sex);
			this.tel = tel;
			this.grade = grade;
		}
		var student = new student("陈有护","18","男","15820327789","高三");*/


	</script>
</body>
</html>